<%-- 
    Document   : enviarVisa
    Created on : 17/02/2009, 01:48:27
    Author     : diego
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script>
            function enviar(){
                var identificacao = document.getElementById("identificacao").value;
                var ambiente = document.getElementById("ambiente").value;
                var modulo = document.getElementById("modulo").value;
                var operacao = document.getElementById("operacao").value;
                var tid = document.getElementById("tid").value;

                var order = document.getElementById("order") == null ? "nulo" : document.getElementById("order").value;
                var price = document.getElementById("price") == null ? "nulo" : document.getElementById("price").value;
                var damount = document.getElementById("damount") == null ? "nulo" : document.getElementById("damount").value;
                var language = document.getElementById("language") == null ? "nulo" : document.getElementById("language").value;
                var URLRetornoVisa = document.getElementById("URLRetornoVisa") == null ? "nulo" : document.getElementById("URLRetornoVisa").value;
                var meiopag = document.getElementById("meiopag") == null ? "nulo" : document.getElementById("meiopag").value;
                var orderid = document.getElementById("orderid") == null ? "nulo" : document.getElementById("orderid").value;
                var mensagem = "Parametros do Teste Visa: \n" +
                    "-identificacao: " +identificacao+ "\n" +
                    "-ambiente: " +ambiente+ "\n" +
                    "-modulo: " +modulo + "\n" +
                    "-operacao: " +operacao+ "\n" +
                    "-tid: " +tid+ "\n" +
                    "-order: " +order+ "\n" +
                    "-price: " +price+ "\n" +
                    "-damount: " +damount+ "\n" +
                    "-language: " +language+ "\n" +
                    "-URLRetornoVisa: " +URLRetornoVisa+ "\n" +
                    "-meiopag: " +meiopag+ "\n" +
                    "-orderid: " +orderid+ "\n";
                //alert(mensagem);
                document.getElementById("formVisa").submit();
            }
        </script>
    </head>
    <body onload="enviar();">
        <form id="formVisa" action="http://comercio.locaweb.com.br/comercio.comp" method="post">
            <input type="hidden" id="identificacao" name="identificacao" value="${identificacao}">
            <input type="hidden" id="ambiente" name="ambiente" value="${ambiente}">
            <input type="hidden" id="modulo" name="modulo" value="${modulo}">
            <input type="hidden" id="operacao" name="operacao" value="${operacao}">
            <input type="hidden" id="tid" name="tid" value="${tid}">
            <c:if test="${order != null}">
                <input type="hidden" id="order" name="order" value="${order}">
            </c:if>
            <c:if test="${price != null}">
                <input type="hidden" id="price" name="price" value="${price}">
            </c:if>
            <c:if test="${damount != null}">
                <input type="hidden" id="damount" name="damount" value="${damount}">
            </c:if>
            <c:if test="${language != null}">
                <input type="hidden" id="language" name="language" value="${language}">
            </c:if>
            <c:if test="${URLRetornoVisa != null}">
                <input type="hidden" id="URLRetornoVisa" name="URLRetornoVisa" value="${URLRetornoVisa}">
            </c:if>
            <c:if test="${meiopag != null}">
                <input type="hidden" id="meiopag" name="meiopag" value="${meiopag}">
            </c:if>
            <c:if test="${orderid != null}">
                <input type="hidden" id="orderid" name="orderid" value="${orderid}">
            </c:if>
        </form>
    </body>
</html>
